
	    var invasives = ['hardinggrass', 'perennialpepperweed', 'poisonhemlock', 'spanishbroom', 'terracinaspurge', 'yellowstarthistle'];
	    var colors = ['red', 'green', 'blue', 'purple', 'gray', 'orange', 'black', 'white'];
	    var icons = [];
	    
	    for (var loopr=0; loopr < colors.length; loopr++)
	    {
		icon = new GIcon();
		icon.image = "http://labs.google.com/ridefinder/images/mm_20_" + colors[loopr] + ".png";
//               icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
                icon.iconSize = new GSize(12, 20);
//                icon.shadowSize = new GSize(22, 20);
                icon.iconAnchor = new GPoint(6, 20);
//                icon.infoWindowAnchor = new GPoint(5, 1);

		icons.push(icon);
	    }

            function initialize(target) {
                if (GBrowserIsCompatible()) {
                    map = new GMap2(document.getElementById(target));
                    map.setUIToDefault();
  		    map.setCenter(new GLatLng(34.124311,-118.815079), 10);

                }

		for (var loopr=0; loopr < invasives.length; loopr++)
		{
			var script = document.createElement('script');
        	        script.src = url + 'contributions/location/' + invasives[loopr] + '/values.gm?type=markers&callback=addMarkers&icon=icons[' + loopr.toString() + ']';
			document.body.appendChild(script);
		}

            }

            function initialize_user_map(username) {
                if (GBrowserIsCompatible()) {
                    map = new GMap2(document.getElementById("map_user_canvas"));
                    map.setUIToDefault();
                    map.setCenter(new GLatLng(34.124311,-118.815079), 11);

                }

                // Show all data but with gray

                //var script = document.createElement('script');
                //script.src = 'http://' + url + '/measure/' + key + '/contributions/location/all/values.gm?type=markers&callback=addMarkers&icon=icons[4]';
                ///document.body.appendChild(script);

                // Show your data but with green

		for (var loopr=0; loopr < invasives.length; loopr++)
		{
			var script = document.createElement('script');
			script.src = url + username + '/contributions/location/'+invasives[loopr]+'/values.gm?type=markers&callback=addMarkers&icon=icons['+loopr.toString()+']'; 
			document.body.appendChild(script);
		}

            }

            
            function addPoly(polyline){
                map.addOverlay(polyline);
                var bounds = polyline.getBounds();
                map.setCenter(bounds.getCenter(), map.getBoundsZoomLevel(bounds));
            }
            
            function addMarkers(object){
                mgr = new GMarkerManager(map);
		mgr.addMarkers(object.markers, 3);
		mgr.refresh();
            }
